@import './_themes.scss';

/*
  使用demo
  .app-home {
    font-size: 18px;
    @include themeify {
      color: themed('font-color');
    }
  }
 */

@mixin themeify {
  @each $theme-name, $theme-map in $themes {
    $theme-map: $theme-map !global;
    html[data-theme=#{$theme-name}] & {
      @content;
    }
  }
}

@function themed($key) {
  @return map-get($theme-map, $key);
}

//获取背景颜色
@mixin background_color($color) {
  @include themeify {
    background-color: themed($color);
  }
}

//获取字体颜色
@mixin font_color($color) {
  @include themeify {
    color: themed($color) !important;
  }
}

//获取边框颜色
@mixin border_color($color) {
  @include themeify {
    border-color: themed($color) !important;
  }
}

//获取边框颜色
@mixin border($color) {
  @include themeify {
    border: 1px solid themed($color) !important;
  }
}
//获取边框颜色
@mixin border-bottom($color) {
  @include themeify {
    border-bottom: 1px solid themed($color) !important;
  }
}
//获取边框颜色
@mixin border-top($color) {
  @include themeify {
    border-top: 1px solid themed($color) !important;
  }
}
//获取边框颜色
@mixin border-left($color) {
  @include themeify {
    border-left: 1px solid themed($color) !important;
  }
}
@mixin border-right($color) {
  @include themeify {
    border-right: 1px solid themed($color) !important;
  }
}


